knitr::opts_chunk$set(echo = FALSE, message = FALSE, echo = FALSE, fig.width = 8)

allocation_by_parcel_analysis <- readRDS( "K:\\Projects\\D1\\Features\\Lakeland_AAA_Phase3\\US98\\TOD_Land_Use_Analysis\\allocation_by_parcel_analysis.rds") %>% 
  mutate(base_far = TOT_LVG_AR/parcel_sqft,
         change_far= tod_far - base_far) %>% 
  ms_simplify(keep = .8, keep_shapes = T)

tmap_mode("view")

MyPal <- rpg_color_pal("rpg_colors")(8)

trend_far <- tm_shape(allocation_by_parcel_analysis) + 
  tm_fill("base_far", title = "Trend Scenario<br>FAR Estimate (2045)", style = "fixed", breaks = c(0, .25, .5, 1, 1.5, 3, 7, 10, 15), palette = MyPal) + 
  tm_shape(station_points) + tm_dots(col = "#8400a8") +
  tm_shape(corridor_buffer_half, is.master=T) + tm_borders(col = "#8400a8")+
    tm_shape(station_buffers_no_overlap) + tm_borders(col = "#8400a8")

tod_far <- tm_shape(allocation_by_parcel_analysis) + 
  tm_fill("tod_far", title = "TOD Scenario<br>FAR Estimate (2045)", style = "fixed", breaks = c(0, .25, .5, 1, 1.5, 3, 7, 10, 15), palette = MyPal) + 
  tm_shape(station_points) + tm_dots(col = "#8400a8") +
  tm_shape(corridor_buffer_half, is.master=T) + tm_borders(col = "#8400a8") +
  tm_shape(station_buffers_no_overlap) + tm_borders(col = "#8400a8")
  
tmap_arrange(trend_far, tod_far, sync = TRUE, ncol = 2)